package cn.iocoder.yudao.module.member.service.cardsecurity;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.member.controller.app.cardsecurity.vo.UploadSaveReqVO;
import cn.iocoder.yudao.module.member.dal.dataobject.cardsecurity.CardSecurityUploadDo;
import cn.iocoder.yudao.module.member.dal.mysql.cardsecurity.CardSecurityUploadMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

/**
 * 证书上传表	 Service 实现类
 *
 * @author base
 */
@Service
@Validated
public class CardSecurityUploadServiceImpl implements CardSecurityUploadService{
    @Resource
    private CardSecurityUploadMapper cardSecurityUploadMapper;

    @Override
    public Integer createUpload(UploadSaveReqVO createReqVO) {
        // 插入
        CardSecurityUploadDo upload = BeanUtils.toBean(createReqVO, CardSecurityUploadDo.class);
        cardSecurityUploadMapper.insert(upload);
        // 返回
        return upload.getId();
    }
}
